/*
 * BluePadMIDlet.java
 *
 * Created on February 20, 2007, 9:35 PM
 */

package com.bloomingstars.bluepad;

import com.bloomingstars.bluepad.ConnectionThread;
import com.bloomingstars.bluepad.comm.DA2Comm;
import javax.microedition.lcdui.Display;
import javax.microedition.midlet.MIDlet;
import javax.microedition.midlet.MIDletStateChangeException;


/**
 *
 * @author toni
 */
public class BluePadMIDlet extends MIDlet
{        
    private static MIDletConfiguration configuration;
    
    protected void startApp() throws MIDletStateChangeException
    {
        ConnectionThread ct = new ConnectionThread();
        Thread t = new Thread(ct);
        t.start();
        DA2Comm comm = ct.connection();
           
        Display display = Display.getDisplay(this);        
        display.setCurrent(new BluePadScreen(comm));             
    }
    
    public static MIDletConfiguration configuration()
    {
        return configuration;
    }    
    
    protected void pauseApp()
    {
    }
    
    protected void destroyApp(boolean unconditional)
    {
    }
}
